package com.mall.db.api;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mall.db.mapper.OmsCompanyAddressMapper;
import com.mall.pojo.OmsCompanyAddress;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class OmsCompanyAddressApiImpl implements OmsCompanyAddressApi {

    @Autowired
    private OmsCompanyAddressMapper omsCompanyAddressMapper;


    @Override
    public List<OmsCompanyAddress> findlistCompanyAddress() {
        LambdaQueryWrapper<OmsCompanyAddress> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.orderByDesc(OmsCompanyAddress::getId);
        //调用方法返回参数
        List<OmsCompanyAddress> omsCompanyAddresses = omsCompanyAddressMapper.selectList(queryWrapper);

        return omsCompanyAddresses;
    }
}
